# dados.R

Danos <- c(
	71.9, 57.1, 6.3, 13.8, 139.5, 31.8, 5.7, 9.8, 5.6, 37.3, 12.1, 35.6,
	10.1, 14.8, 13.5, 15.1, 23.2, 17.8, 6.0, 31.9, 13.5, 6.6, 23.0, 24.0,
	5.7, 18.4, 11.5, 7.2, 17.5, 54.3, 6.3, 6.2, 6.8, 6.4, 16.3, 9.6,
	15.5, 7.5, 81.0, 10.0, 20.6)

Anos <- c(
	1900, 1915, 1916, 1919, 1926, 1928, 1932, 1933, 1935, 1938, 1944, 1944,
	1945, 1947, 1949, 1954, 1954, 1955, 1955, 1960, 1961, 1964,	1965, 1969,
	1970, 1972, 1979, 1983, 1989, 1992, 1995, 1996, 1999, 2001, 2004, 2004,
	2004, 2004, 2005, 2005, 2005)

NAnos <- 106

h <- hist(Danos, breaks=seq(min(Danos), max(Danos), length=6),
	right=FALSE, plot=FALSE)
h <- data.frame(x=h$mids, y=h$count/length(Danos)/(h$mids[2]-h$mids[1]))

xlim <- c(h$x[1], h$x[length(h$x)])




# our own fdp function

source('cenas/intlagrange.R')

fdp <- cut_lagrange(h$x, h$y, h$x[1], h$x[length(h$x)])





# other distributions

fnorm <- function(x, mean, var)
	dnorm(x, mean, sqrt(var))
flnorm <- function(x, mean, var)
	dlnorm(x, mean, sqrt(var))
fexp <- function(x) (dexp(xs-xlim[1], .04))

lmean <- mean(log(Danos))
lsd <- sd(log(Danos))+.2
lfdp <- function(x) flnorm(x, lmean, lsd^2)

